/**
*@Author:zt
*@Description: 菜单管理相关接口
*@Date 2024-08-14
*/
import request from '@/http'

// 单位树形
export const tree = async (data: object) => {
  return await request.get({
    url: '/authority/sysTModule/tree/'+data,
  })
}

// 系统管理菜单树形
export const menutree = async (data: object) => {
  return await request.get({
    url: '/authority/sysTModule/menutree',
  })
}

// 查询首页菜单
export const menus = async (data: object) => {
  return await request.get({
    url: '/authority/sysTModule/menus',
  })
}

// 分页列表查询
export const page = async (data: object) => {
  return await request.post({
    url: '/authority/sysTModule/page',
    data: data
  })
}

 // 批量查询
 export const query = async (data: any) => {
  return await request.post({
    url: '/authority/sysTModule/query' ,
    data: data,
  })
}

// 新增
export const add = async (data: object) => {
  return await request.post({
    url: '/authority/sysTModule',
    data: data
  })
}


// 修改
export const update = async (data: object) => {
  return await request.post({
    url: '/authority/sysTModule/update',
    data: data
  })
}

// 删除
export const del = async (data: Array<any>) => {
  return await request.post({
    url: '/authority/sysTModule/delete',
    data,
    headersType: 'application/x-www-form-urlencoded'
  })
}

 // 查询单个数据
 export const singleQuery = async (data: any) => {
  return await request.get({
    url: '/authority/sysTModule/'+data
  })
}



